package Campus.help.user.dao;

import Campus.help.common.utils.R;
import Campus.help.user.entity.UserInfo;
import Campus.help.user.vo.InformationVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author haoyun.xiong
 * @since 2023-03-20
 */
public interface UserInfoMapper extends BaseMapper<UserInfo> {

     UserInfo getbyUserName(@Param("userName") String userName);

    InformationVo getInformation(@Param("id") Long id);

    R updatePicture(@Param("url") String pictureUrl,@Param("id") Long id);

    String getUserAvatarByid(Long id);

    int createUser(@Param("userInfo") UserInfo userInfo);

    boolean updateRate(Long id, BigDecimal rate);

    List<UserInfo> getAllUserInfo();
}
